package com.yoso.shop.infrastructure.base.service;

import com.github.pagehelper.PageInfo;
import com.yoso.shop.infrastructure.base.entity.BaseEntity;
import com.yoso.shop.infrastructure.base.vo.PageVo;

import java.util.List;

public interface IBaseService<E extends BaseEntity,M extends BaseEntityExample> {
    long countByExample(M example);

    int deleteByExample(M example);

    int deleteByPrimaryKey(String id);

    int insert(E record);

    int insertSelective(E record);

    List<E> selectByExample(M example);
    
    E selectByPrimaryKey(String id);

    int updateByExampleSelective( E record,  M example);

    int updateByExample(E record, M example);

    int updateByPrimaryKeySelective(E record);
    int updateByPrimaryKey(E record);

    PageInfo<E> pageConditionsList(PageVo pageVo);

    List<E> listAll();
}
